package com.hbnu.config;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

public class WebInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {

    //负责数据层和业务层配置类的管理
    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class[]{SpringRepositoryConfig.class, SpringServiceConfig.class};
    }

    //负责视图层和控制层配置类的管理
    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class[]{SpringWebConfig.class};
    }


    @Override
    protected String[] getServletMappings() {
        return new String[]{"/"};
    }
}
